<#include "/common/pager_style/commonForm.ftl" encoding="UTF-8">
<script type="text/javascript" src="${request.contextPath}/resources/FCKeditor/fckeditor.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/jquery/plugin/ajaxupload/ajaxfileupload.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/jquery/zyplugin/appplugins/jquery.appPlugins.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/ntkoocx.js"></script>
<script type="text/javascript" src="${request.contextPath}/deptdoc/deptDoc.js"></script>
<#-- 定义有哪些按钮 reset:重写 back:返回 -->
<#assign buttonsName = {"list":"刷新","back":"返回"}>
<#assign buttonsImage={"save":"send.gif","refuse":"detail.gif","hisRecord":"view.gif","hisReview":"view.gif","later":"detail.gif","coOperation":"detail.gif","draft":"save.gif","add":"add.gif","agree":"detail.gif","isfinish":"detail.gif"}>		
<#assign lookSubButtons={"coOperation":"协办意见","hisRecord":"流转历史","hisReview":"审核历史"}>
<#assign selectButtons=[{"name":"其他菜单","icon":"icon-edit","subButtons":lookSubButtons}]>
<style type="text/css">
.uploadstyle{

	margin-right:15px
	
	}
.pad{
	padding:10px;
}
</style>
<!--[if IE 8]>
<style>
.aui_title {position:absolute; top:0;}
</style>
<![endif]-->
<script language="JavaScript">
<!--
	var actName="deptDocRecordAction";
	var domainName="deptDocRecord";
// function opt_hisReview(){
// 	<#if reviewList?exists&&reviewListLength?exists&&reviewListLength!='0' > 
// 	art.dialog({
// 	      	title: '审核记录',
// 	      	content: document.getElementById('reviewHistory'),
// 	      	width:'70%',
// 	      	height:'70%',
// 	      	lock: true,
// 	      	ok: function(){
// 	      	},
// 	      	cancel: false
// 	      });
// 	<#else>
// 	art.dialog({
// 	    title: '审核记录',
// 	    content: "暂无审核记录！",
// 	    lock: true,
// 	    ok: function(){
// 	    },
// 	    cancel:false
// 	});
// 	</#if>
// }
// function opt_hisRecord(){
// 	<#if reviewList1?exists&&reviewListLength1?exists&&reviewListLength1!='0' > 
// 	art.dialog({
// 	      	title: '流转历史',
// 	      	content: document.getElementById('recordHistory'),
// 	      	width:'70%',
// 	      	height:'70%',
// 	      	lock: true,
// 	      	ok: function(){
// 	      	},
// 	      	cancel: false
// 	      });
// 	<#else>
// 	art.dialog({
// 	    title: '流转历史',
// 	    content: "暂无流转历史！",
// 	    lock: true,
// 	    ok: function(){
// 	    },
// 	    cancel:false
// 	});
// 	</#if>
// }

// function opt_coOperation(){
// 	<#if deptDocCoOperationList?exists&&deptDocCoOperationListLength?exists&&deptDocCoOperationListLength!='0' > 
// 	art.dialog({
// 	      	title: '协办意见',
// 	      	content: document.getElementById('coOperation'),
// 	      	width:'70%',
// 	      	height:'70%',
// 	      	lock: true,
// 	      	ok: function(){
// 	      	},
// 	      	cancel: false
// 	      });
// 	<#else>
// 	art.dialog({
// 	    title: '协办意见',
// 	    content: "该事项无协办单位！",
// 	    lock: true,
// 	    ok: function(){
// 	    },
// 	    cancel:false
// 	});
// 	</#if>
// }

function showWord(){
	if($("#buttonSvrFile").val()=="显示正文"){
				$("#divTgContain").show();
				$("#wordBox").show();
				$("#divTgContain").contents().find("object").show();
				 $("#buttonSvrFile").val("隐藏正文");
		}else{
			$("#buttonSvrFile").val("显示正文");
			$("#divTgContain").hide();
			$("#wordBox").hide();
			$("#divTgContain").contents().find("object").hide();
		}
}
//-->
</script>

</head>
<body class="frameForm">
<form name="dictALForm" action="" method="post" onsubmit="return checkForm();" class="form-horizontal" role="form">
	<input type="hidden" id="id" name="id" value="${(deptDocRecord.id)?if_exists}"/>
	<input type="hidden" id="deptDocRecord.id" name="deptDocRecord.id" value="${(deptDocRecord.id)?if_exists}"/>
	<input type="hidden" name="page.offset" id="page.offset" value="${(page.offset)?if_exists}" >
	<input type="hidden" name="page.pageSize" id="page.pageSize" value="${(page.pageSize)?if_exists}">
	<input type="hidden" name="isDraftSave" id="isDraftSave" value="${(isDraftSave)?if_exists}">
	<input type="hidden" name="isFromSysPendings" id="isFromSysPendings" value="${(isFromSysPendings)?if_exists}">
	<input type="hidden" name="editState" id="editState" value="${(editState)?if_exists}">
	<input type="hidden" name="statusType" id="statusType" value="${(statusType)?if_exists}">
	<input type="hidden" id="deptDocRecord.docDataId" name="deptDocRecord.docDataId" value="${(deptDocRecord.docDataId)?if_exists}"/>
	<input type="hidden" id="deptDocRecord.docDataSwid" name="deptDocRecord.docDataSwid" value="${(deptDocRecord.docDataSwid)?if_exists}"/>
	<input type="hidden" id="deptDocRecord.status" name="deptDocRecord.status" value="${(deptDocRecord.status)?if_exists}"/>
	<input type="hidden" id="deptDocRecord.lwUnit.id" name="deptDocRecord.lwUnit.id" value="${(deptDocRecord.lwUnit.id)?if_exists}"/>
	<input type="hidden" name="deptDocReview.reviewType" id="deptDocReview.reviewType" value="">
		
		<#--		当前用户相关信息		-->
	<input type="hidden" name="cur_userId" 			id="cur_userId" 			value="${(currentUser.id)?if_exists}"/>
	<input type="hidden" name="cur_userCode" 		id="cur_userCode" 			value="${(currentUser.code)?if_exists}"/>
	<input type="hidden" name="cur_userName" 		id="cur_userName" 			value="${(currentUser.name)?if_exists}"/>
	<input type="hidden" name="cur_fullName" 		id="cur_fullName" 			value="${(currentUser.fullName)?if_exists}"/>
	<input type="hidden" name="cur_deptId" 			id="cur_deptId" 			value="${(currentUser.deptId)?if_exists}"/>
	<input type="hidden" name="cur_deptName" 		id="cur_deptName" 			value="${(currentUser.deptName)?if_exists}"/>
	<input type="hidden" name="cur_fullDeptName"	id="cur_fullDeptName" 		value="${(currentUser.fullDeptName)?if_exists}"/>
	<input type="hidden" name="cur_roleCodes"		id="cur_roleCodes" 			value="${convertArrayToString(currentUser.roleCodes)}"/>
	<input type="hidden" name="cur_groupCodes"		id="cur_groupCodes" 		value="${convertArrayToString(currentUser.groupCodes)}"/>
	<input type="hidden" name="cur_orgId"		    id="cur_orgId" 		        value="${(currentUser.orgId)?if_exists}"/>
	<input type="hidden" name="cur_orgName"		    id="cur_orgName"			value="${(currentUser.orgName)?if_exists}"/>
	<input type="hidden" name="cur_fullOrgName"		id="cur_fullOrgName"		value="${(currentUser.fullOrgName)?if_exists}"/>
	<input type="hidden" name="cur_orgDeptRootId" 	id="cur_orgDeptRootId"		value="${(currentUser.orgDeptRootId)?if_exists}"/>
    <input type="hidden" name="cur_orgDeptRootName" id="cur_orgDeptRootName" 	value="${(currentUser.orgDeptRootName)?if_exists}"/>
    <input type="hidden" name="cur_s3" 			id="cur_s3" 			value="${(currentUser.s3)?if_exists}"/>
	<#--		当前日期、时间等信息	-->
	<input type="hidden" name="cur_now"				id="cur_now" 				value="${(currentUser.now)?if_exists}"/>
	<input type="hidden" name="cur_date"			id="cur_date" 				value="${(currentUser.date)?if_exists}"/>
	<input type="hidden" name="cur_time"			id="cur_time" 				value="${(currentUser.time)?if_exists}"/>
	    <#--   查看该流程是否有盖过章(天谷)的版式文件 -->
    <input type="hidden" name="isHasSeal" id="isHasSeal" value="${(isHasSeal)?if_exists?string}"	/>
    <input type="hidden" name="sealPdfId" id="sealPdfId" value="${(sealPdfId)?if_exists?string}"	/>
    <input type="hidden" name="canSealPdfId" id="canSealPdfId" value="${(canSealPdfId)?if_exists?string}"	/>
	    <#-- 路径参数 -->
    <input type="hidden" name="pathParam" 			id="pathParam" 			value="${(request.contextPath)?if_exists}"/>
		
			<!--st-->
		<div class="ui-com-top">
		<#-- 生成按钮 -->
		<#include "/common/pager_style/pageButtonsEx.ftl" encoding="UTF-8">
	</div><!-- end #ui-com-top -->
	<div class="ui-com-main">
	<div class="ui-formfield">
	<table class="tbl">
		<caption>
		<#if (entityTitle)?exists>
			${(entityTitle)?if_exists}
		</#if>
		</caption>
		<!-- 数据录入 -->
		<tbody>
			<tr>
				<td class="empty" style="padding:0; border:0;" width="15%"></td>
				<td class="empty" style="padding:0; border:0;" width="35%"></td>
				<td class="empty" style="padding:0; border:0;" width="15%"></td>
				<td class="empty" style="padding:0; border:0;" width="35%"></td>
			</tr>
			<@pEdit.pageEditText
					label="标题"
					pageState="${editState}"
					beginTR="true"
					endTR="false"
					colSpanNum="1"
					attName="deptDocRecord.title"
					attValue="${(deptDocRecord.title)?if_exists}"/>
			<@pEdit.pageEditText
					label="文号"
					pageState="${editState}"
					colSpanNum="1"
					beginTR="false"
					endTR="true"
					attName="deptDocRecord.docNum"
					attValue="${(deptDocRecord.docNum)?if_exists}"
					/>		
			<!--来文单位-->
			<@pEdit.pageEditText
					label="发文单位"
					pageState="${editState}"
					colSpanNum="1"
					beginTR="true"
					endTR="false"
					inputReadOnly="true"
					attName="deptDocRecord.lwUnit.name"
					attValue="${(deptDocRecord.lwUnit.name)?if_exists}"
					/>
			<@pEdit.pageEditText
					label="创建人"
					pageState="${editState}"
					colSpanNum="1"
					beginTR="false"
					endTR="true"
					inputReadOnly="true"
					attName="deptDocRecord.createBy.userName"
					attValue="${(deptDocRecord.createBy.userName)?if_exists}"
					/>	
			<@pEdit.pageEditText
					label="主办单位"
					pageState="${editState}"
					colSpanNum="1"
					beginTR="true"
					endTR="false"
					inputReadOnly="true"
					attName="deptDocRecord.receiveUnit.name"
					attValue="${(deptDocRecord.receiveUnit.name)?if_exists}"
					/>		
			<@pEdit.pageEditText
					label="协办单位"
					pageState="${editState}"
					colSpanNum="1"
					beginTR="false"
					endTR="true"
					inputReadOnly="true"
					attName="deptDocRecord.coOperationUnitNames"
					attValue="${(deptDocRecord.coOperationUnitNames)?if_exists}"
					/>		
	
				<@pEdit.pageEditText
						label="分管领导"
						pageState="${editState}"
						colSpanNum="1"
						beginTR="true"
						endTR="false"
						inputReadOnly="true"
						attName="deptDocRecord.fgLeader.userName"
						attValue="${(deptDocRecord.fgLeader.userName)?if_exists}"
						/>	
				<input type="hidden" name="deptDocRecord.fgLeader.id" id="deptDocRecord.fgLeader.id" value="${(deptDocRecord.fgLeader.id)?if_exists}">			
				
				<@pEdit.pageEditSelectUserValue
					label="缓急程度"
					cssStyle="width:152px;"
					colSpanNum="1"
					beginTR="false"
					endTR="true"
					pageState="${editState}"
					attName="deptDocRecord.emergercyDegree"
					attValue="${(deptDocRecord.emergercyDegree)?if_exists}"
					optionSource={"1":"常规","2":"加急","3":"紧急"}
					defaultValue="1"
					/>		
			<@pEdit.pageEditText
					label="来文时间"
					pageState="${editState}"
					colSpanNum="1"
					beginTR="true"
					endTR="false"
					inputReadOnly="true"
					attName="deptDocRecord.createTime2"
					attValue="${(deptDocRecord.createTime)?if_exists}"
					/>											
			<@pEdit.pageEditTextDate
					label="办理时限"
					cssStyle="width:145px;"
					colSpanNum="1"
					beginTR="false"
					endTR="true"
					pageState="${editState}"
					attName="deptDocRecord.expectDate"
					attValue="${(deptDocRecord.expectDate)?if_exists}"/>
	

	<!--附件str-->					
						<tr >
					<th>
						<span><label for="">附件</label></span>
					</th>
					<td colspan="3">
						<div id="_attachments1" class="uploadstyle" style="">
						</div>
					<script type="text/javascript">
					<!--
						$(document).ready(function(){
							var $attach=$("#_attachments1");
							// 生成供下载的附件及上传功能
							var isShowed=$attach.attr("isShowed");
							if(isEmpty(isShowed) || isShowed!="true"){
								$attach.showAttachment("DEPT_DOC_RECORD",${(deptDocRecord.docDataId)?if_exists},{type:""});
								$attach.attr("isShowed","true");
							}
						});
					//-->
					</script>						
					</td>
				</tr
<!--附件end-->																
				<#if deptDocCoOperationMain.opinion??>
				<@pEdit.pageEditTextarea
						label="意见反馈时间"
						pageState="else"
						attName="deptDocRecord.finishTime"
						height="50px;"
						colSpanNum="3"
						cssStyle="height:100%;width:100%;"
						attValue="${(deptDocRecord.finishTime)?if_exists}"/>		
				</#if>					
				<@pEdit.pageEditTextarea
						label="主办单位意见"
						pageState="else"
						attName="deptDocRecord.returnRemark"
						height="50px;"
						colSpanNum="3"
						cssStyle="height:100%;width:100%;"
						attValue="${(deptDocCoOperationMain.opinion)?if_exists}"/>
<!--主办部门附件下载sta-->						
				<tr >
					<th>
						<span><label for="">主办单位附件</label></span>
					</th>
					<td colspan="3">

						<div id="_attachments5" class="uploadstyle" style="">
						</div>
					<script type="text/javascript">
					<!--
						$(document).ready(function(){
							var $attach=$("#_attachments5");
							// 生成供下载的附件及上传功能
							var isShowed=$attach.attr("isShowed");
							if(isEmpty(isShowed) || isShowed!="true"){
								$attach.showAttachment("DEPT_DOC_RECORD",${(deptDocCoOperationMain.newestDocDataId)?if_exists},{type:""});
								$attach.attr("isShowed","true");
							}
						});
					//-->
					</script>						
					
					</td>
				</tr>
<!--主办部门附件下载end-->		
	<#if editState="else">	
				<#if statusType="10"&&deptDocRecord.agreeOpinion?exists && deptDocRecord.agreeOpinion ="投诉">
				<#else>
				<#if deptDocRecord.formCode??&& deptDocRecord.formCode="zdyxq">
				<@pEdit.pageEditTextarea
						label="办结评价"
						pageState="else"
						attName="deptDocRecord.agreeOpinion"
						height="50px;"
						colSpanNum="3"
						cssStyle="height:100%;width:100%;"
						attValue="${(deptDocRecord.agreeOpinion)?if_exists}"/>
						</#if>
				</#if>
			<#if statusType="9" &&deptDocRecord.agreeOpinion?exists && deptDocRecord.agreeOpinion ="投诉">				
				<@pEdit.pageEditTextarea
						label="投诉意见"
						pageState="else"
						attName="deptDocRecord.assessOpinion"
						height="50px;"
						colSpanNum="3"
						cssStyle="height:100%;width:100%;"
						attValue="${(deptDocRecord.assessOpinion)?if_exists}"/>		
						</#if>
	</#if>								
			</tbody>
		</table>
		
<!--===============流转历史start======================-->
<#-- 				<div id="recordHistory" class="pad" style="height:500px;display:none;overflow-x:hidden;overflow-y:auto" >		
		<#if reviewList1?exists&&reviewListLength1?exists&&reviewListLength1!='0' > 
			<table class="tbl">
			<caption>流转历史</caption>
			<tbody>
				<tr>
				<td class="empty" style="padding:0; border:0;" width="5%"></td>
				<td class="empty" style="padding:0; border:0;" width="10%"></td>
				<td class="empty" style="padding:0; border:0;" width="20%"></td>
				<td class="empty" style="padding:0; border:0;" width="20%"></td>
				<td class="empty" style="padding:0; border:0;" width="10%"></td>
				<td class="empty" style="padding:0; border:0;" width="10%"></td>
				</tr>
				<td align="center">序号</td>
				<td align="center">单位名称</td>
				<td align="center">完成情况</td>
				<td align="center">附件</td>
				<td	align="center">打开时间</td>
				<td align="center">完成时间</td>				
			 <#list reviewList1 as review>
			 	<tr>	
			<td align="center">${((review.num)?if_exists)?html}</td>
			<td align="center">${((review.createUnit)?if_exists)?html}</td>
			<td align="center">${((review.title)?if_exists)?html}</td>
					<td align="center" >
						<div id="${(review.docDataId)?if_exists}a" class="uploadstyle" style="text-align:left;"></div>
					<script type="text/javascript">
						$(document).ready(function(){
							var $attach=$("#${(review.docDataId)?if_exists}a");
							// 生成供下载的附件及上传功能
							var isShowed=$attach.attr("isShowed");
							if(isEmpty(isShowed) || isShowed!="true"){
								$attach.showAttachment("DEPT_DOC_RECORD",${(review.docDataId)?if_exists},{type:""});
								$attach.attr("isShowed","false");
							}
						});
					</script>
					</td>
						
				<td align="center">${((review.reviewTime)?if_exists)?html}</td>
				<td align="center">${((review.finishTime)?if_exists)?html}</td>	
					</tr>
			 </#list>
			 
			</tbody>
		</table>
		 </#if>
		</div> -->
<!--=============流转历史end=================-->
		
<!--=============协办意见start===========-->
<#-- 		 <div id="coOperation" class="pad" style="height:500px;display:none;overflow-x:hidden;overflow-y:auto" >		
		<#if deptDocCoOperationList?exists&&deptDocCoOperationListLength?exists&&deptDocCoOperationListLength!='0' > 
			<table class="tbl">
			<caption>协办单位意见</caption>
			<tbody>
				<tr>
				<td  class="empty" style="padding:0; border:0;" width="20%"></td>
				<td  class="empty" style="padding:0; border:0;" width="20%"></td>
				<td  class="empty" style="padding:0; border:0;" width="10%"></td>
				<td  class="empty" style="padding:0; border:0;" width="10%"></td>
				<td  class="empty" style="padding:0; border:0;" width="10%"></td>
				</tr>

				<td align="center">协办单位</td>
				<td align="center">协办意见</td>
				<td align="center">附件</td>
				<td	align="center">完成人</td>
				<td align="center">完成时间</td>	
			
			 <#list deptDocCoOperationList as review>
			 	<tr>	
			<td align="center">${((review.unitId.name)?if_exists)?html}</td>
			<td align="center">${((review.opinion)?if_exists)?html}</td>
			<td align="center" >
						<div id="${(review.docDataId)?if_exists}c" class="uploadstyle" style="text-align:left;"></div>
					<script type="text/javascript">
					<!--
						$(document).ready(function(){
							var $attach=$("#${(review.docDataId)?if_exists}c");
							// 生成供下载的附件及上传功能
							var isShowed=$attach.attr("isShowed");
							if(isEmpty(isShowed) || isShowed!="true"){
								$attach.showAttachment("DEPT_DOC_RECORD",${(review.docDataId)?if_exists},{type:""});
								$attach.attr("isShowed","false");
							}
						});
					//-->
					</script>
			</td>
			<td align="center">${((review.finishBy.userName)?if_exists)?html}</td>
			<td align="center">${((review.finishTime)?if_exists)?html}</td>	
				</tr>
			 </#list>
			 
			</tbody>
		</table>
		 </#if>
		 </div> -->
<!--====================协办意见end=========================-->	
<#-- 			
		 <div id="reviewHistory" class="pad" style="height:500px;display:none;overflow-x:hidden;overflow-y:auto" >		
		<#if reviewList?exists&&reviewListLength?exists&&reviewListLength!='0' > 
		<table class="tbl">
		<caption>审核记录</caption>
		<tbody>
			<tr>
				<td class="empty" style="padding:0; border:0;" width="10%"></td>
				<td class="empty" style="padding:0; border:0;" width="13%"></td>
				<td class="empty" style="padding:0; border:0;" width="10%"></td>
				<td class="empty" style="padding:0; border:0;" width="13%"></td>
				<td class="empty" style="padding:0; border:0;" width="10%"></td>
				<td class="empty" style="padding:0; border:0;" width="13%"></td>
				<td class="empty" style="padding:0; border:0;" width="10%"></td>
				<td class="empty" style="padding:0; border:0;" width="21%"></td>
			</tr>
	        <#list reviewList as review>
	        	<@pEdit.pageEditText
					label="审核类型"
					pageState=""
					endTR="false"
					attName="review.reviewType"
					attValue="${(review.reviewType)?if_exists}"
					colSpanNum="1"
					/>
					<@pEdit.pageEditText
					label="审核人"
					pageState=""
					beginTR="false"
					endTR="false"
					attName="review.reviewBy.userName"
					attValue="${(review.reviewBy.userName)?if_exists}"
					colSpanNum="1"
					/>
					<@pEdit.pageEditSelectUserValue
					label="审核结果"
					colSpanNum="1"
					beginTR="false"
					endTR="false"
					colSpanNum="1"
					pageState=""
					attName="review.status"
					attValue="${(review.status)?if_exists}"
					optionSource={"-1":"不同意","1":"同意"}
					defaultValue="1"
					/>	
				<@pEdit.pageEditText
					label="审核时间"
					colSpanNum="1"
					beginTR="false"
					endTR="true"
					pageState=""
					attName="review.reviewTime"
					attValue="${(review.reviewTime)?if_exists}"
					/>	
			<@pEdit.pageEditText
					beginTR = "true"
					endTR = "true"
					label="审核意见"
					inputReadOnly="true"
					pageState="${editState}"
					attName="review.opinion"
					attValue="${(review.opinion)?if_exists}"
					colSpanNum="8"/>
	        </#list>
        </tbody>
	</table>
        </#if>
      </div>	 -->	

      <#include "/week/models/dialog.ftl" encoding="UTF-8"/>
      <!--正文sta-->
         <div style="padding-left:21px">
        <input type='button' style = "font-size:15px" id="buttonSvrFile" value="隐藏正文" onclick="showWord();return false;">
       		</div>
         <div  id='wordBox'>
          <#if (!isHasSeal?exists || (isHasSeal!="1"&&isHasSeal!="2"))>
        <div  id='wordFile'>
		<a name="#word"></a>
		<#-- 导入word控件 -->
		<#include "/common/wordcontrol.ftl" encoding="UTF-8"/>
		</div>
		<#else>
			<iframe border=0 id='divTgContain' src="./workflow/jet/TGPDFPlugInCtrlView.htm" width='100%' height='850px' ></iframe>
		</#if>
	</div>
      <!--正文end-->
	</div><!--end #ui-formfield-->
	
	
	</div><!-- end #ui-com-main -->
		
		
		<!--en-->
		
	
</form>
</body>
</html>